/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.scene.domain;

import com.koron.common.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.Objects;


@ApiModel(value = "JSA作业项", description = "JSA作业项实体类")
public class JSATemplateStep extends BaseEntity {

    public JSATemplateStep() {
        super();
    }

    public JSATemplateStep(String name, String hiddenDanger, String precaution, String risk) {
      this.name = name;
      this.hiddenDanger = hiddenDanger;
      this.precaution = precaution;
      this.risk = risk;
    }

    @ApiModelProperty(value = "名称", name = "name", required = true)
    private String name;

    @ApiModelProperty(value = "潜在危害", name = "hiddenDanger", required = true)
    private String hiddenDanger;

    @ApiModelProperty(value = "防范措施", name = "precaution", required = true)
    private String precaution;

    @ApiModelProperty(value = "风险评估", name = "risk", required = true)
    private String risk;

    @ApiModelProperty(value = "模板Id", name = "templateId", required = true)
    private String templateId;

    @ApiModelProperty(value = "模板名称", name = "templateName", required = true)
    private String templateName;

    @ApiModelProperty(value = "排序号", name = "index", required = true)
    private Integer stepIndex;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getHiddenDanger() {
        return hiddenDanger;
    }

    public void setHiddenDanger(String hiddenDanger) {
        this.hiddenDanger = hiddenDanger;
    }

    public String getPrecaution() {
        return precaution;
    }

    public void setPrecaution(String precaution) {
        this.precaution = precaution;
    }

    public String getRisk() {
        return risk;
    }

    public void setRisk(String risk) {
        this.risk = risk;
    }

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getTemplateName() {
        return templateName;
    }

    public void setTemplateName(String templateName) {
        this.templateName = templateName;
    }

    public Integer getStepIndex() {
        return stepIndex;
    }

    public void setStepIndex(Integer stepIndex) {
        this.stepIndex = stepIndex;
    }

    @Override
    public String toString() {
        return "JSATemplateStep{" +
                "name='" + name + '\'' +
                ", hiddenDanger='" + hiddenDanger + '\'' +
                ", precaution='" + precaution + '\'' +
                ", risk='" + risk + '\'' +
                ", templateId='" + templateId + '\'' +
                ", templateName='" + templateName + '\'' +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        JSATemplateStep that = (JSATemplateStep) o;
        return Objects.equals(getId(), that.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hash(getId());
    }

}
